.SUFFIXES : .x .o .c .s

ROOT = /usr/local/arm_linux_4.2/
INC :=$(ROOT)/arm-linux/include
LIB = $(ROOT)/lib/gcc/arm-linux/4.2.1
LIB1 =$(ROOT)/arm-linux/lib

CC=arm-linux-gcc -O2 -g -I$(INC) -static
WEC_LDFLAGS=-L$(LIB) -L$(LIB1)
STRIP=arm-linux-strip

TARGET = wap800_app
SRCS := main.c  gprs.c  protocol.c 24l01.c nrf_msg.c wap800.c comm.c gsm.c devmanage.c crc16.c \
		debug.c  json_object.c  json_tokener.c  json_util.c  linkhash.c  printbuf.c arraylist.c \
		des.c md5.c localupdate.c input.c
#LIBS = -lgcc
LIBS = -lpthread

all: 
	$(CC) $(WEC_LDFLAGS) $(SRCS) -o $(TARGET) $(LIBS)
	$(STRIP) $(TARGET)
clean:
	rm -f *.o 
	rm -f *.x 
	rm -f *.flat
	rm -f *.map
	rm -f temp
	rm -f *.img
	rm -f $(TARGET)	
	rm -f *.gdb
	rm -f *.bak
	rm -f *.c~
	rm -f *.h~
